import { BlogDetail } from "../entitys/store";

export const mockDetail: BlogDetail = {
  list: [
    {
      title: "vue2 的创建项目",
      content: [
        {
          title: "搭建项目方法：",
          content: [
            {
              componentName: "text",
              props: {
                children: "1.vue create 项目名称，项目名称不能大写",
              },
            },
            {
              componentName: "img",
              props: {
                src: "../../src/assets/blogImg/create.png", // 替换为你的图片路径
                alt: "创建项目",
              },
            },
            {
              componentName: "text",
              props: {
                children: " 2.选择默认配置即可", // 要显示的文本内容
              },
            },
            {
              componentName: "img",
              props: {
                src: "../../src/assets/blogImg/detault.png",
                alt: "描述性文本", // 可选的alt文本，用于图片无法加载时显示
              },
            },
            {
              componentName: "text",
              props: {
                children: "3.进入项目目录", // 要显示的文本内容
              },
            },
            {
              componentName: "text",
              props: {
                children: "npm run serve",
                class: "code",
              },
            },
            {
              componentName: "text",
              props: {
                children: `4:浏览器打开http://localhost:8080/`,
              },
            },
            {
              componentName: "text",
              props: {
                children: `5:项目创建完成`,
              },
            },
          ],

          img: "",
        },
        {
          title: "vue ui 可视化创建项目",
          content: [
            {
              componentName: "text",
              props: {
                children: "1.安装vue ui",
              },
            },
            {
              componentName: "img",
              props: {
                src: "../../src/assets/blogImg/uicmd.png", // 替换为你的图片路径
                alt: "创建项目",
              },
            },
            {
              componentName: "text",
              props: {
                children: "2.进行默认得配置",
              },
            },
            {
              componentName: "img",
              props: {
                src: "../../src/assets/blogImg/ui.png", // 替换为你的图片路径
                alt: "创建项目",
              },
            },
          ],

          img: "",
        },
        {
          title: "vue新建项目遇到得问题",
          content: [
            {
              componentName: "text",
              props: {
                children:
                  "1.关闭严格模式：在 vue.config.js  文件中 配置 lintOnSave:false,",
              },
            },
            {
              componentName: "text",
              props: {
                children: `module.exports = defineConfig({ <br>      
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transpileDependencies: true,<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lintOnSave:false   //关闭严格模式<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})`,
                class: "code",
              },
            },
            {
              componentName: "text",
              props: {
                children: "2.vue新建出来，在文件第一行，有一个波浪线，报错提示： <br>Parsing error : No Babel comfig file detected for 路径 解析错误  <br>解决方法 ：  在 .eslintrc 文件中，parserOptions 中 配置  requireConfigFile:false",
              },
            },
            {
              componentName: "text",
              props: {
                children: ` parserOptions: {<br>   
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parser: '@babel/eslint-parser',<br>   
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requireConfigFile: false,  //新增配置<br>   
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}`,
                class: "code",
              },
            },
            {
              componentName: "text",
              props: {
                children: "	3.组件命名报错 “Component name “XXX“ should always be multi-word”的解决方法--没有整个文件就新建即可",
              },
            },
            {
              componentName: "text",
              props: {
                children: ` module.exports = {<br>   
                  root: true,<br>   
                  env: {<br>   
                    node: true<br>   
                  },<br>   
                  'extends': [<br>   
                    'plugin:vue/essential',<br>   
                    'eslint:recommended'<br>   
                  ],<br>   
                  parserOptions: {<br>   
                    parser: '@babel/eslint-parser'<br>   
                  },<br>   
                  rules: {<br>   
                    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',<br>   
                    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',<br>   
                     //在rules中添加自定义规则<br>   
                     //关闭组件命名规则<br>   
                     "vue/multi-word-component-names":"off",<br>   
                  },<br>   
                  overrides: [<br>   
                    {<br>   
                      files: [<br>   
                        '**/__tests__/*.{j,t}s?(x)',<br>   
                        '**/tests/unit/**/*.spec.{j,t}s?(x)'<br>   
                      ],<br>   
                      env: {<br>   
                        jest: true<br>   
                      }<br>   
                    }<br>   
                  ]<br>   
                }<br>   
                `,
                class: "code",
              },
            },
          ],

          img: "",
        },
      ],
      desc: "我们推荐在你的浏览器上安装。它允许你在一个更友好的界面中审查和调试 Vue 应用。",
      img: "vue",
      history: 0,
      hot: 0,
      like: 0,
      date: "2021-07-01",
      id: "00000000001",
    },
  ],
};
